home *** CD-ROM | disk | FTP | other *** search
/ Adobe Digital Video Collection / Digital Video Collection CD.iso / IlIustrator 10 / data1.cab / Program_Files / Presets / Scripts / ExportDocsAsFlash.js < prev    next >
Encoding:
Text File  |  2001-10-30  |  895 b   |  35 lines

  1. // save all open documents as flash documents
  2.  
  3. //$.bp();    //    Uncomment this line to cause the script to be run in the JavaScript debugger window.
  4.  
  5. numDocuments = documents.length;
  6.  
  7. for ( i = 0 ; i < numDocuments; i++)
  8. {
  9.     aDocument = documents[i];
  10.     theDocumentName = aDocument.name;
  11.     
  12.     flashOptions = new ExportOptionsFlash();
  13.  
  14.     flashOptions.jpegQuality = 10;
  15.     flashOptions.curveQuality = 10;
  16.     flashOptions.replacing = SaveOptions.SAVECHANGES;
  17.  
  18.     docPath = aDocument.path;
  19.     docPathStr = docPath.toString();
  20.  
  21.     if (docPathStr.length > 1)
  22.     {
  23.         documentPath = docPath + "/" + aDocument.name;
  24.     }
  25.     else
  26.     {
  27.         // This is a brand new file and doesn't have a path yet,
  28.         // so put it in the illustrator application folder.
  29.         documentPath = path + "/" + aDocument.name;
  30.     }
  31.  
  32.     theFile = new File(documentPath);
  33.     aDocument.exportFile(theFile, ExportType.FLASH, flashOptions);
  34. }
  35.